<?php

namespace app\common\validate\order;

use think\Validate;

class Order extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'nameAgent'=>'require',
        'idCard'=>'require',
        'consigneeTelephone'=>'require',
        'consigneeAddress'=>'require',
        'consignee'=>'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'nameAgent.require'=>'必须选择代理商！',
        'idCard.require'=>'必须选择业务员！',
        'consigneeTelephone.require'=>'必须填写收货方电话！',
        'consigneeAddress.require'=>'必须填写收货方地址！',
        'consignee.require'=>'必须填写收货方联系人！',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['nameAgent','idCard','consigneeTelephone','consigneeAddress','consignee'],
        'edit' => [],
    ];
    
}
